<?php

class Admin_SettingsController extends App_Controller_Action
{	
	public function indexAction()
	{
		$this->_redirect("/admin/settings/reset-password");
    }
	
	public function resetPasswordAction()
	{
    	$request=$this->getRequest();
    	if($request->isPost())
    	{
    		$email = $request->getParam('email');    	    		
    		$password = $request->getParam('password');    	 
    		$model_admin = new Model_UserAdmin();
			$result = $model_admin->udpatePassword($email,$password);
			
			if ($result){
				$this->_redirect("/admin/settings/reset-confirm");	
			}else{
				$this->view->error_msg="Sorry, password reset failed.";					
			}
				
    	}
    }

	public function resetConfirmAction()
	{
    }
        
}

